#!/bin/bash

# 数据库配置脚本
# 使用方法: source ./set-db-config.sh

echo "Setting database configuration..."

# 设置数据库环境变量
export DB_URL="jdbc:mysql://rm-bp1nv0zakj96v24k7vo.mysql.rds.aliyuncs.com:3306/news?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true"
export DB_USERNAME="news_db"
export DB_PASSWORD="Aa270141577!"

echo "Database configuration set successfully!"
echo "DB_URL: $DB_URL"
echo "DB_USERNAME: $DB_USERNAME"
echo "DB_PASSWORD: [HIDDEN]"

echo ""
echo "Now you can start the application:"
echo "./start-dev.sh"